home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.c
- Subject: Re: (void(far *)()) 0
- Date: 5 Feb 1996 18:11:44 -0600
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4f66c0$cn0@solutions.solon.com>
- References: <341998718.10858110@magnet.at> <31165B9D.398E@imsisoft.com>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <31165B9D.398E@imsisoft.com>,
- Victor Bazarov <vbazarov@imsisoft.com> wrote:
- >> .... = (void(far *)()) 0;
-
- >> Now I want to know if my assumption is right and
- >> in case it is, what does this mean for 0 ?
-
- >Nothing but what you've said -- cast. '0' has type 'int',
- >and must be converted into pointer to function in order
- >to be properly assigned.
-
- Not exactly.
-
- 0 is a special case. Zero cast to a pointer type is a null pointer of that
- type. Or rather, *a constant zero* is. An integer with value zero may
- produce different results.
-
- A textual zero, cast to pointer type, points at no object; this is magic.
-
- Before you try to correct or clarify this, *make sure you have read the
- C FAQ and understand the relevant points.*
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1995 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- Using trn? Weird new newsgroup problem? I know the fix! Email me!
- The *other* C FAQ - ftp taniemarie.solon.com /pub/c/afq - Not A Flying Toy
-